package main

import (
	"fmt"
	"gin_cli/conf"
	_ "gin_cli/pkg/wechat"
	"gin_cli/routers"
	_ "gin_cli/schedule"
	"net/http"
)

func main() {
	// router := routers.InitRouter()
	s := &http.Server{
		Addr:           fmt.Sprintf(":%d", conf.ServerConf.HttpPort),
		Handler:        routers.InitRouter(),
		ReadTimeout:    conf.ServerConf.ReadTimeout,
		WriteTimeout:   conf.ServerConf.WriteTimeout,
		MaxHeaderBytes: 1 << 20,
	}

	s.ListenAndServe()
	return
}
